<?php
return array(
	'attributeLabels' => array(
		'fid' => '开户银行',
		'worker.worker_name' => '用户'
	),

	'rules' => array(
		array('fid, worker_id,amount','required'),
	),
	
	'relations' => array(
		'account' => array(ActiveRecord::BELONGS_TO, 'FinancialAccount', 'fid'),
		'worker' => array(ActiveRecord::BELONGS_TO, 'WorkerAccount', 'worker_id')
	),
	
	'behaviors' => array(
		'stateHandle' => array(
			'class' => 'ModelState',
			'handleField' => 'status',
			'configName' => 'status.receivables.wApply',
			'configReader' => Yii::app()->config,
			'initState' => 'ST_NONE',
		),
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'worker_id',
			),
			'autoRun' => false,
		),
		'uidResolver' => array(
			'class' => 'application.behaviors.LyAutoIdBehavior',
			'uid' => 'worker_id'
		),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);